/**
 * Created by zilong on 8/3/15.
 */
var express = require('express');
var router = express.Router();

router.get('/', function (req, res, next) {
    res.render('main/home',{
        title:'首页'
    });
});

router.get('/product',function(req,res){
    res.render('main/product',{
        title:'产品中心'
    })
})

router.get('/cooperation',function(req,res){
    res.render('main/cooperation',{
        title:'加盟合作'
    })
})

var posts = require('../model/posts.js')
var activities = require('../model/activities.js')
router.get('/news',function(req,res){
    res.render('main/news',{
        title:'行业信息',
        posts:posts,
        activities:activities
    })
})

router.get('/contact',function(req,res){
    res.render('main/contact',{
        title:'关于我们'
    })
})

module.exports  = router;